package gui;

import java.awt.Graphics2D;

public class Draw {

	public static void string(Graphics2D g, String string, int xPos, int yPos, double hAlign, double vAlign) {
		int x = (int) (xPos - hAlign * (g.getFontMetrics().stringWidth(string)) / 2);
		int y = (int) (yPos + (vAlign + 0.5) * g.getFontMetrics().getHeight() / 2);
		g.drawString(string, x, y);
	}
}
